//
//  TrainingViewController.m
//  hellomui
//
//  Created by zhangtao on 15/9/23.
//  Copyright © 2015年 zt.td. All rights reserved.
//

#import "TrainingViewController.h"

@interface TrainingViewController ()

@property (strong, nonatomic) IBOutlet UIView *noNetStatusIV;
@property (strong, nonatomic) IBOutlet UIButton *loadBtn;
@end

@implementation TrainingViewController

- (void)viewDidLoad {
    
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self netStatus];
    self.loadBtn.layer.borderWidth = 2;
    self.loadBtn.layer.borderColor = [[UIColor colorWithRed:253/255.f green:183/255.f blue:180/255.f alpha:1]CGColor];
}

-(void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];

    [self netStatus];
}

-(void)netStatus{
    NSString *status = [[NSUserDefaults standardUserDefaults]valueForKey:@"netStatus"];
    if ([status isEqualToString:@"0"] ||
        [status isEqualToString:@"-1"]) {
        _noNetStatusIV.hidden = NO;
    }else{
        _noNetStatusIV.hidden = YES;
    }


}

- (IBAction)laodBtn:(id)sender {
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
